﻿package {	import flash.display.Loader;	import flash.display.MovieClip;	import flash.events.MouseEvent;	import flash.net.URLRequest;	import flash.net.navigateToURL;	public class ImagePost extends MovieClip {		private var requeteImage:URLRequest;		private var loadImage:Loader = new Loader();		public var lien:String;		public var target:String;		public function ImagePost(src:String) {			super();			if (src!=null) {				requeteImage=new URLRequest(src);				//loadImage.addEventListener(Event.COMPLETE, onImageLoaded);				loadImage.load(requeteImage);				addChild(loadImage);				//trace(loadImage.contentLoaderInfo);				addEventListener(MouseEvent.CLICK,clickIt);				buttonMode=true;			}		}		public function clickIt(e:MouseEvent):void {			var goto:URLRequest=new URLRequest(lien);			//trace("lien :" +lien+" - target :"+target);			navigateToURL(goto,target);		}	}}